package cn.cjp.day02;

public class Student {

    private String name;

    //方法构造
    public Student(){
        System.out.println("nothing");
        System.out.println("=====================");
    }

    //重载
    public Student(String name){
        System.out.println(name);
        this.name = name;                                 //通过参数直接修改，而不用多次使用set
        System.out.println("=====================");
    }

    public void setName(String name){
        this.name = name;
    }

    public String getName(){
        return name;
    }
}
